package negModel;

import java.util.Iterator;
import negModelExcep.eParteInexistente;
import negModelExcep.eParteNoRemovible;
import java.util.Observable;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

public abstract class Vehiculo extends Observable{

	private int performance;
	private int aerodinamia;
	private int otros;
	private float velMaxima;
	
	public void setPerformance(int p){
		this.performance = p;
	}
	
	public int getPerformance(){
		return this.performance;
	}
	
	public void incrementarPerformance(int p){
		this.performance+=p;
	}
	
	public void decrementarPerformance(int p){
		this.performance-=p;
	}
	
	public void setAerodinamia(int a){
		this.aerodinamia=a;
	}
	
	public int getAerodinamia(){
		return this.aerodinamia;
	}
	
	public void incrementarAerodinamia(int a) {
		this.aerodinamia+=a;		
	}
	
	public void decrementarAerodinamia(int a) {
		this.aerodinamia-=a;		
	}
	
	public void setVelMaxima(float v){
		this.velMaxima=v;
	}
	
	public float getVelMaxima(){
		return this.velMaxima;
	}
	
	public void incrementarVelMaxima(float aportevmax) {
		this.velMaxima+=aportevmax;		
	}
	
	public void decrementarVelMaxima(float aportevmax) {
		this.velMaxima-=aportevmax;		
	}
	
	public void setOtrasMejoras(int o){
		this.otros=o;
	}
	
	public int getOtrasMejoras(){
		return this.otros;
	}
	
	public void incrementarOtrasMejoras(int o){
		this.otros+=0;		
	}
	
	public void decrementarOtrasMejoras(int o){
		this.otros-=o;		
	}
	
	public abstract Parte agregarParte(Parte parte);

	
	public abstract Parte sacarParte(Parte parte) throws eParteNoRemovible, eParteInexistente; 

	public abstract ListaPartes mostrarPartes();
	
	public abstract Iterator iterator();

	public abstract double getVelocidad();
	
	public abstract double getRpm();

	public abstract void acelerar() ;
		
	public abstract void desacelerar() ;

	public abstract void avanzar(double coeficiente) ;
	
	public abstract Element toXml(Document doc);
	
}
		
	

				

